from typing import AnyStr
from requests import Session
from utils.common_sydr import reqMethod



# /topicapi/tmsMock/front/frontListMock
def frontListMock(uri:AnyStr,data,pageNum,pageRows,session:Session):
    argsPosition = {"body": "str"}
    L=[]
    L.append(pageNum)
    L.append(pageRows)
    return reqMethod(uri, data, session, "post", argsPosition,L)

# /topicapi/tmsExam/front/selectMockRank
def selectMockRank(uri:AnyStr,data,mockId,paperId,session:Session):
    argsPosition = {"uri": "dict"}
    L=[]
    L.append(mockId)
    L.append(paperId)
    return reqMethod(uri, data, session, "get", argsPosition,L)


# /topicapi/tmsExam/front/saveExam
def saveExam(uri:AnyStr,data,mockId,paperId,userId,session:Session):
    argsPosition = {"body": "str"}
    L=[]
    L.append(mockId)
    L.append(paperId)
    L.append(userId)
    return reqMethod(uri, data, session, "post", argsPosition,L)


# /topicapi/tmsMock/front/frontFetchPaperInfoByMockIdAndPaperId
def frontFetchPaper(uri:AnyStr,data,examId,session:Session):
    argsPosition = {"body": "str"}
    L=[]
    L.append(examId)
    return reqMethod(uri, data, session, "post", argsPosition,L)


# /topicapi/tmsExam/front/handPaper
def handPaper(uri:AnyStr,data,userId,examId,mockId,paperId,otopicList,stopicList,session:Session):
    argsPosition = {"body": "str"}
    L=[]
    L.append(userId)
    L.append(examId)
    L.append(mockId)
    L.append(paperId)
    L.append(otopicList)
    L.append(stopicList)
    return reqMethod(uri, data, session, "post", argsPosition,L)

# /topicapi/tmsExam/front/fetchExamResultSimple
def fetchExamResultSimple(uri:AnyStr,data,examId,session:Session):
    argsPosition = {"uri": "dict"}
    L=[]
    L.append(examId)
    return reqMethod(uri, data, session, "get", argsPosition,L)